#include "customsearchtablewnd.h"
#include  "customdropeventsubwnd.h"
#include "ui_customsearchtablewnd.h"

CustomSearchTableViewWnd::CustomSearchTableViewWnd(QWidget *parent) :
    QWidget(parent),
    ui(new Ui::CustomSearchTableViewWnd)
//    ui(new Ui::CustomSearchTableViewWnd)
{
    ui->setupUi(this);

    m_customHeaderview=new CustomHeaderView(Qt::Horizontal,this);

    ui->tableView->setHorizontalHeader(m_customHeaderview);

    QStandardItemModel* _model=new QStandardItemModel;
    ui->tableView->setModel(_model);
    _model->setColumnCount(3);
    _model->setRowCount(3);

    QStringList _strList;
    _strList<<"数学"<<"语文"<<"英语";
    _model->setHorizontalHeaderLabels(_strList);

    QHBoxLayout* _hbo=new QHBoxLayout;
    CustomDropEventSubWnd* _dropWnd=new CustomDropEventSubWnd(this);
    _hbo->addWidget(_dropWnd);
    _hbo->setContentsMargins(0,0,0,0);
    ui->widget->setLayout(_hbo);

}

CustomSearchTableViewWnd::~CustomSearchTableViewWnd()
{
    delete ui;
}
